home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / uwpc201.zip / UW-SRC.ZIP / MOUSE.H < prev    next >
C/C++ Source or Header  |  1991-06-09  |  3KB  |  94 lines

  1. //-------------------------------------------------------------------------
  2. //
  3. // MOUSE.H - Declarations for handling the mouse events.
  4. // 
  5. //  This file is part of UW/PC - a multi-window comms package for the PC.
  6. //  Copyright (C) 1990-1991  Rhys Weatherley
  7. //
  8. //  This program is free software; you can redistribute it and/or modify
  9. //  it under the terms of the GNU General Public License as published by
  10. //  the Free Software Foundation; either version 1, or (at your option)
  11. //  any later version.
  12. //
  13. //  This program is distributed in the hope that it will be useful,
  14. //  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. //  GNU General Public License for more details.
  17. //
  18. //  You should have received a copy of the GNU General Public License
  19. //  along with this program; if not, write to the Free Software
  20. //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. //
  22. // Revision History:
  23. // ================
  24. //
  25. //  Version  DD/MM/YY  By  Description
  26. //  -------  --------  --  --------------------------------------
  27. //    1.0    08/06/91  RW  Original Version of MOUSE.H
  28. //
  29. // You may contact the author by:
  30. // =============================
  31. //
  32. //  e-mail: rhys@cs.uq.oz.au
  33. //    mail: Rhys Weatherley
  34. //          5 Horizon Drive
  35. //          Jamboree Heights
  36. //          Queensland 4074
  37. //        Australia
  38. //
  39. //-------------------------------------------------------------------------
  40.  
  41. #ifndef __MOUSE_H__
  42. #define    __MOUSE_H__
  43.  
  44. #include "client.h"        // Client declarations.
  45.  
  46. //
  47. // Define constants for the mouse buttons.  Note that the
  48. // middle mouse button is not supported by UW/PC.
  49. //
  50. #define    MOUSE_LEFT    1
  51. #define    MOUSE_RIGHT    2
  52.  
  53. //
  54. // The following variable will be non-zero when the mouse status
  55. // has been detectably changed.
  56. //
  57. extern    int    MouseChange;
  58.  
  59. //
  60. // The following variable will be non-zero when the mouse is active.
  61. //
  62. extern    int    MouseActive;
  63.  
  64. //
  65. // Initialise the mouse to be used by UW/PC.  This routine should
  66. // be called after the screen has been initialised.  It returns
  67. // a non-zero value if the mouse could be initialised, zero otherwise.
  68. //
  69. int    InitMouse    (void);
  70.  
  71. //
  72. // Terminate the handling of the mouse.
  73. //
  74. void    TermMouse    (void);
  75.  
  76. //
  77. // Send the current mouse status to the given client.  This may
  78. // be called any time after initialisation, but usually after
  79. // "MouseChange" has been set.
  80. //
  81. void    SendMouseEvent    (UWClient *client);
  82.  
  83. //
  84. // Display the mouse if it is not already visible.
  85. //
  86. void    ShowMouse    (void);
  87.  
  88. //
  89. // Remove the mouse from the screen.
  90. //
  91. void    HideMouse    (void);
  92.  
  93. #endif    /* __MOUSE_H__ */
  94.